// 作为接口层统领 virtio_disk 和 ram_disk
#include "dev/vio.h"
#include "fs/base_buf.h"
#include "lib/str.h"
#include "lib/print.h"

void disk_init(void)
{
#ifdef visionfive
    ram_disk_init();
#else
    virtio_disk_init();
#endif
}

void disk_rw(buf_t* buf, bool write)
{
#ifdef visionfive
    ram_disk_rw(buf, write);
#else
    virtio_disk_rw(buf, write);
#endif

}

void disk_intr()
{
#ifdef visionfive
    ram_disk_intr();
#else
    virtio_disk_intr();
#endif
}